** This do file corrects data errors in Gartzke and Weisiger 2013 and replicates
** the core findings.  Variables ending in "corr" are corrected versions of the
** the regime variables.  The other change between specifications is 
** replacing colonial contiguity with the standard contiguity dummy.  Results 
** (other than for contiguity) are stable across specifications.

clear all
set more off
set mem 2g

use GW2013_corrected, clear

logit mzmidl demloi demhii logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base1

logit mzmidl demlocorr demhicorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new1

logit mzmidl demloi regdiffi logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base2

logit mzmidl demlocorr regdiffcorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new2

logit mzmidl demloi regdiffi propdemi logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base3

logit mzmidl demlocorr regdiffcorr propdemcorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new3

logit mzmidl demloi regdiffi regpropi propdemi logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base4

logit mzmidl demlocorr regdiffcorr regpropcorr propdemcorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new4

logit mzmidl demloi regdiffi dempoweri logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base5

logit mzmidl demlocorr regdiffcorr dempowercorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new5

logit mzmidl demloi regdiffi regpowri dempoweri logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base6

logit mzmidl demlocorr regdiffcorr regpowrcorr dempowercorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new6

logit mzmidl demloi regdiffi sysdemsdi logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base7

logit mzmidl demlocorr regdiffcorr sysdemsdcorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new7

logit mzmidl demloi regdiffi regsyssdi sysdemsdi logdist colcont allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo base8

logit mzmidl demlocorr regdiffcorr regsyssdcorr sysdemsdcorr logdist cntgdumy allydumy capratio onemajor mzyp mzyr*, cluster(dyadid)
eststo new8



#del ;
esttab base1 new1 base2 new2 base3 new3 base4 new4 using responsetables.tex, tex b(a2) se l scalars(ll chi2) 
o(demloi demlocorr demhii demhicorr regdiffi regdiffcorr propdemi propdemcorr regpropi regpropcorr logdist colcont cntgdumy allydumy
capratio onemajor) drop(mzy*) star(\dag .1 * .05 ** .01 *** .001) mtitles("Model 1" "Model 2" "Model 3" "Model 4") nonum
title("Replication of Table 2\label{tab-robust1}") nonotes 
addnotes("Significance Levels: \sym{\dag}10\%; \sym{*}5\%; \sym{**}1\%; \sym{***}0.1\%") replace;


esttab base5 new5 base6 new6 base7 new7 base8 new8 using responsetables.tex, tex b(a2) se l scalars(ll chi2) 
o(demloi demlocorr regdiffi regdiffcorr dempoweri dempowercorr regpowri regpowrcorr sysdemsdi sysdemsdcorr regsyssdi regsyssdcorr 
logdist colcont cntgdumy allydumy capratio onemajor) drop(mzy*) star(\dag .1 * .05 ** .01 *** .001) 
mtitles("Model 1" "Model 2" "Model 3" "Model 4") nonum title("Replication of Table 2\label{tab-robust2}") nonotes 
addnotes("Significance Levels: \sym{\dag}10\%; \sym{*}5\%; \sym{**}1\%; \sym{***}0.1\%") append;

#del cr;



do response_prediction_propdem

forvalues i=1/14 {
drop b`i'
}
drop level* yr* preds*

do response_prediction_dempower

forvalues i=1/14 {
drop b`i'
}
drop level* yr* preds*

do response_prediction_sysdemsd

forvalues i=1/14 {
drop b`i'
}
drop level* yr* preds*
